package com.huabo.contract.service.impl;

import com.huabo.contract.config.DateBaseConfig;
import com.huabo.contract.oracle.entity.TblCyhwBudetgoods;
import com.huabo.contract.oracle.mapper.TblCyhwBudetgoodsMapper;
import com.huabo.contract.service.TblCyhwBudetgoodsService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class TblCyhwBudetgoodsServiceImpl implements TblCyhwBudetgoodsService {

    @Resource
    private TblCyhwBudetgoodsMapper tblCyhwBudetgoodsMapper;

    @Override
    public List<TblCyhwBudetgoods> findkFirstLevel() {
        if(DateBaseConfig.DATABASETYPE.equals("Oracle")) {
            return tblCyhwBudetgoodsMapper.findkFirstLevel();
        } else {
            return tblCyhwBudetgoodsMapper.findkFirstLevel();
        }
    }

    @Override
    public List<TblCyhwBudetgoods> findkListByParentId(Integer goodstype) {
        if(DateBaseConfig.DATABASETYPE.equals("Oracle")) {
            return tblCyhwBudetgoodsMapper.findkListByParentId(goodstype);
        } else {
            return tblCyhwBudetgoodsMapper.findkListByParentId(goodstype);
        }
    }
}
